Skip to content

Conversation

@whqtker
Copy link
Member

@whqtker whqtker commented Feb 6, 2026

관련 이슈

작업 내용

로그인 응답에서 refresh token은 제외하도록 @JsonIgnore 어노테이션을 붙였습니다.
아예 해당 필드는 제거할 수는 없는게, 응답 DTO에서 refresh token 필드를 통해 쿠키를 설정하고 있습니다. 따라서 프론트에게 전달만 되지 않도록 설정했습니다.

더 좋은 방법이 있다면 말씀해주세요 ~


추가로 sign-up 엔드포인트에는 쿠키로 리프레시 토큰을 전달하고 있지 않아서(응답으로 전달하고 있었음), 쿠키로 전달하도록 추가 반영했습니다 !

특이 사항

리뷰 요구사항 (선택)

@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

Walkthrough

  1. SignInResponse 레코드에 refreshToken 컴포넌트에 @JsonIgnore 어노테이션이 추가되었습니다.
  2. OAuthSignInResponse 레코드에서 isRegistered 컴포넌트가 제거되고 refreshToken@JsonIgnore가 추가되었습니다.
  3. SignUpPrepareResponse 레코드에서 isRegistered 컴포넌트가 제거되었고, 팩토리 메서드 of(...)가 새 생성자 시그니처에 맞춰 업데이트되었습니다.
  4. OAuthService의 성공 시 응답 생성 로직이 OAuthSignInResponse(accessToken, refreshToken) 호출로 변경되었습니다.
  5. 관련 단위 테스트에서 isRegistered()에 대한 검증 어서션들이 제거되었습니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • lsy1307
  • wibaek
  • JAEHEE25
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 변경 사항의 핵심을 명확하게 전달합니다: 응답에서 refresh token을 제외하여 전달하도록 변경한다는 의도가 분명합니다.
Linked Issues check ✅ Passed 모든 코드 변경사항이 이슈 #460의 요구사항을 충족합니다: @JsonIgnore를 통해 refresh token을 응답 본문에서 제외했습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 refresh token을 응답에서 제외하는 목표와 관련성이 있으며, 범위를 벗어난 변경사항은 없습니다.
Description check ✅ Passed PR 설명이 템플릿 구조를 따르고 있으며, 이슈 번호, 작업 내용, 그리고 추가 반영 사항을 포함하고 있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@sukangpunch sukangpunch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!! 궁금한 점 리뷰 달았습니다.

boolean isRegistered,
String accessToken,
String refreshToken) implements OAuthResponse {
@JsonIgnore String refreshToken) implements OAuthResponse {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제 생각에 Response 객체는 http 응답 본문을 나타내는 객체라고 생각하여 명확하게 엑세스 토큰과 isRegisterd 필드만 담은 response dto를 따로 두어 컨트롤러에서 매핑하여 리턴하는 방식은 어떠신가요?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 동의합니다~ isRegisterd이건 왜 필요한건가요??

전 내부에서 쿠키에 세팅하는 객체를 예를들어

 public record SignInResult(
          AccessToken accessToken,
          RefreshToken refreshToken
  ) { }

이런식으로 쓰고

controller에서 응답용으론

  public record SignInResponse(
          String accessToken
  ) { }

이렇게 하면 되는 거 아닌가 했는데 놓친 히스토리가 있나 싶어서요!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그러네요 코드에서는 isRegistered 필드를 참조하는 로직이 없네요 이 부분도 말씀하신 내용 반영하면서 수정하겠습니다 !

Copy link
Contributor

@Gyuhyeok99 Gyuhyeok99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

형준님 의견에 추가 의견 남겼습니다~

boolean isRegistered,
String accessToken,
String refreshToken) implements OAuthResponse {
@JsonIgnore String refreshToken) implements OAuthResponse {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 동의합니다~ isRegisterd이건 왜 필요한건가요??

전 내부에서 쿠키에 세팅하는 객체를 예를들어

 public record SignInResult(
          AccessToken accessToken,
          RefreshToken refreshToken
  ) { }

이런식으로 쓰고

controller에서 응답용으론

  public record SignInResponse(
          String accessToken
  ) { }

이렇게 하면 되는 거 아닌가 했는데 놓친 히스토리가 있나 싶어서요!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: 로그인 후 response body 로 refresh 토큰은 주지 않도록

3 participants